package com.elione.interceptor;import com.elione.model.UserInfo;import com.opensymphony.xwork2.ActionInvocation;import com.opensymphony.xwork2.interceptor.AbstractInterceptor;import java.util.Map;import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;public class LoginInterceptor extends AbstractInterceptor{  private static final long serialVersionUID = 5550396840134228058L;  private Logger logger = LogManager.getLogger(LoginInterceptor.class);  public String intercept(ActionInvocation invocation)    throws Exception  {    Map<?,?> map = invocation.getInvocationContext().getSession();    UserInfo user = (UserInfo)map.get("user");    if (user == null)    {      this.logger.debug(" Session is null , no user ! return noLogin !");      return "noLogin";    }    this.logger.debug(" session is exist , userName = " + user.getName());    return invocation.invoke();  }}